package com.futureCloudMOM.core.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.futureCloudMOM.core.entity.FBaseEntity;
import com.futureCloudMOM.framework.dict.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "Produce_Dispatch", description = "派工单")
@TableName(value = "Produce_Dispatch")
public class ProduceDispatch extends FBaseEntity implements Serializable {


    
    @NotNull(message="[生产订单主表ID]不能为空")
    @ApiModelProperty("生产订单主表ID")
    @TableField(value = "taskBillId")
    private Long taskBillId;
    
    @NotNull(message="[任务订单子表ID]不能为空")
    @ApiModelProperty("任务订单子表ID")
    @TableField(value = "taskBillSubID")
    private Long taskBillSubId;
    
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("派工单号")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "dispatchNo")
    private String dispatchNo;
    
    @NotNull(message="[工序号]不能为空")
    @ApiModelProperty("工序号")
    @TableField(value = "subNo")
    private Long subNo;
    
    @NotNull(message="[部门ID]不能为空")
    @ApiModelProperty("部门ID")
    @TableField(value = "departmentId")
    private Long departmentId;
    
    @NotNull(message="[工序ID]不能为空")
    @ApiModelProperty("工序ID")
    @TableField(value = "procId")
    private Long procId;
    
    @NotNull(message="[工作中心ID]不能为空")
    @ApiModelProperty("工作中心ID")
    @TableField(value = "workcenterId")
    private Long workcenterId;
    
    @ApiModelProperty("生产资源ID")
    @TableField(value = "resourceId")
    private Long resourceId;
    
    @ApiModelProperty("物料ID")
    @TableField(value = "materialId")
    private Long materialId;
    
    @ApiModelProperty("模具ID")
    @TableField(value = "moldId")
    private Long moldId;
    
    @ApiModelProperty("模穴数")
    @TableField(value = "moldQty")
    private Long moldQty;
    
    @NotNull(message="[派单日期]不能为空")
    @ApiModelProperty("派单日期")
    @TableField(value = "dispatchDate")
    private Date dispatchDate;
    
    @NotNull(message="[计划开始日期]不能为空")
    @ApiModelProperty("计划开始日期")
    @TableField(value = "planStart")
    private Date planStart;
    
    @NotNull(message="[计划结束日期]不能为空")
    @ApiModelProperty("计划结束日期")
    @TableField(value = "planEnd")
    private Date planEnd;
    
    @ApiModelProperty("实际开始日期")
    @TableField(value = "actualStart")
    private Date actualStart;
    
    @ApiModelProperty("实际结束日期")
    @TableField(value = "actualEnd")
    private Date actualEnd;
    
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("生产批次")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "batchNo")
    private String batchNo;
    
    @NotBlank(message="[任务数量]不能为空")
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("任务数量")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "qty")
    private BigDecimal qty;
    
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("派工数量")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "dispatchQty")
    private BigDecimal dispatchQty;
    
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("报工数量")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "reportQty")
    private BigDecimal reportQty;
    
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("报废数量")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "scrapQty")
    private BigDecimal scrapQty;
    
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("返工数量")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "reworkQty")
    private BigDecimal reworkQty;
    
    @ApiModelProperty("派工班组ID")
    @TableField(value = "groupID")
    private Long groupID;
    
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("派工人员编码")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "dispatchEmpCode")
    private String dispatchEmpCode;
    
    @ApiModelProperty("派工人员Id")
    @TableField(value = "dispatchEmpId")
    private Long dispatchEmpId;
    
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("派工供应商编码")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "dispatchSupplyCode")
    private String dispatchSupplyCode;
    
    @ApiModelProperty("派工供应商Id")
    @TableField(value = "dispatchSupplyId")
    private Long dispatchSupplyId;
    
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("派工设备编码")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "dispatchFacilityCode")
    private String dispatchFacilityCode;
    
    @ApiModelProperty("派工设备ID")
    @TableField(value = "dispatchFacilityId")
    private Long dispatchFacilityId;
    
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("报工人员编码")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "reportEmpCode")
    private String reportEmpCode;
    
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("领料单别")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "pickExt")
    private String pickExt;
    
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("领料单号")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "pickNo")
    private String pickNo;
    
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("备注")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "remark")
    private String remark;
    
    @ApiModelProperty("派工单状态")
    @TableField(value = "status")
    @Dict(dictCode = "produce_dispatch_status")
    private Long status;
    
    @ApiModelProperty("源报工单Id")
    @TableField(value = "sourceReportId")
    private Long sourceReportId;
    
    @ApiModelProperty("源派工单Id")
    @TableField(value = "sourceDispatchId")
    private Long sourceDispatchId;
    
    @ApiModelProperty("最后报工员工")
    @TableField(value = "lastReporterEmpId")
    private Long lastReporterEmpId;
    
    @ApiModelProperty("单位Id")
    @TableField(value = "unitId")
    private Long unitId;
    
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("转换数量")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "conversionQty")
    private String conversionQty;
    
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("转换率")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "conversionRate")
    private String conversionRate;
    
    @ApiModelProperty("转换单位")
    @TableField(value = "conversionUnitId")
    private Long conversionUnitId;
    
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("生产类型（自制/委外）")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "routeType")
    @Dict(dictCode = "route_type")
    private Long routeType;
    
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("单价")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "priceOne")
    private BigDecimal priceOne;
    
    @ApiModelProperty("质检次数")
    @TableField(value = "qcRecordCount")
    private Long qcRecordCount;
    
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("未报工数量")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "notReportQty")
    private BigDecimal notReportQty;
    
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("总工时")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "totalTime")
    private BigDecimal totalTime;
    
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("总工价")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "totalPrice")
    private BigDecimal totalPrice;
    
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("标准工时")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "stdTime")
    private BigDecimal stdTime;
    
    @ApiModelProperty("订单交期")
    @TableField(value = "receivingDate")
    private Date receivingDate;
    
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("加工工价")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "stdPrice")
    private BigDecimal stdPrice;






}

